package agh.tk.markuptranslation;

public class ResizableImage extends AbstractComponent
{
	/**
	 * Obiekt tej klasa moze byc lewym synem Image
	 * @param leftChild - tekst linku do obrazka
	 * @param rightChild - rozmiar(klasa Size)
	 */
	public ResizableImage(IComponent leftChild, IComponent rightChild) 
	{
		super(leftChild, rightChild);
	}
	@Override
	public String toDokuWiki()
	{
		return toDokuWiki("?") ;
	}
	@Override
	public String toMediaWiki()
	{
		return null ;
	}
	
	@Override
	public String toHTML() {
		if(leftChild==null)
			return null;
		StringBuilder result = new StringBuilder(leftChild.toHTML());
		result.append("\"");
		//result.delete(result.length()-1,result.length());
		result.append(rightChild.toHTML());
		//result.append("/>");
		return result.toString();
	}
}
